<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>onmouseover</title>
		<style type="text/css">
	#one{width:150px;height:150px;background:lightblue;}
	#two{width:200px;height:40px;border:dashed 2px cyan;margin-top:30px;}


	</style>
</head>
<body>
	<div id ='one'></div>
	<div id ='two'></div>
	<script type="text/javascript">
	//获取元素
	var one =document.getElementById('one');
	var two =document.getElementById('two');

	//鼠标房山区的hi事件
	one.onmouseover =function()
	{
		//alert('真舒服');
	}
//鼠标离开的事件
	one.onmouseout = function()
	{
		//alert('赶快离开,受不了了');
	}

	window.onmousemove =function(e)
	{
		var x = e.clientX;
		var y = e.clientY;
		console.log('X:'+x+'=='+'Y'+y);
	}	

	window.onmousemove =function(e)
	{
		var x = e.clientX;
		var y =e.clientY;
		two.innerHTML ='X:'+x +'==='+'Y:'+y;
	}

	</script>
</body>	
</html>